package com.biz.primus.ms.promotion.dao.po;

import com.biz.primus.base.enums.CommonStatus;
import com.biz.primus.ms.base.jpa.po.BaseEntity;
import java.time.LocalDateTime;
import java.util.List;
import javax.persistence.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 自定义活动
 *
 * @author david-liu
 */
@Entity
@Table(name = "pmt_activity")
@Getter
@Setter
public class Activity extends BaseEntity {
    private static final long serialVersionUID = 5818597631484893528L;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 活动名称
     */
    private String name;

    /**
     * 活动描述
     */
    private String description;

    /**
     * 活动Logo
     */
    private String logo;

    /**
     * 活动页面富文本信息
     */
    private String rawHtml;

    /**
     * 启用状态
     */
    @Enumerated(value = EnumType.STRING)
    private CommonStatus status;

    /**
     * 活动项列表
     */
    @OneToMany(mappedBy = "activity", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<ActivityItem> items;
}
